home *** CD-ROM | disk | FTP | other *** search
- Path: zynet.net!usenet
- From: damage@nashuauk.zynet.co.uk (Damage)
- Newsgroups: comp.lang.c++
- Subject: cin and floats
- Date: Sun, 14 Jan 1996 22:48:02 GMT
- Organization: Zynet Ltd
- Message-ID: <4d9d0g$5s0@sol.zynet.net>
- NNTP-Posting-Host: nashuauk.zynet.co.uk
- X-Newsreader: Forte Free Agent 1.0.82
-
- HELP! I can't seem to use "cin" to input into floating point numbers.
- Whenever I enter a decimal number I just get "Floating Point
- Overflow". Integers are fine, it's also fine if I enter whole number
- into the float variable (and yes I'm positive that I've declared the
- variable correctly).
-
- I am using Turbo C++ 4.5 for Windows under Win '95.
-
- eg:
- float x;
-
- cout << "Enter Real Number: ";
- cin >> x;
-
- Any help would be most appreciated.
-
- Cheers. Shane.
- ...~daMage~...
-
-